<!doctype html>
<html xmlns:th="http://www.w3.org/1999/xhtml">

<head>
    <th:block th:include="/A0723/include :: header('新闻详情')"/>
    <style>
        p{
            color:white;
        }
    </style>
</head>

<body>
<header class="mui-bar mui-bar-nav">
    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
    <h1 class="mui-title">新闻详情</h1>
</header>
<div class="mui-content">

    <!-- 公告 -->

        <div style="margin-top: 10px;width: 100%;height: 100%;text-align: center;" id="flex3">

        </div>

</div>

<th:block th:include="/A0723/include :: footer"/>
<script type="text/javascript">
	$(function(){
        getSysNoticeById([[${noticeId}]]);
		mui('body').on('tap', 'a', function () {
			window.top.location.href = this.href;
		});
	})
    //获取新闻公告列表
    function getSysNoticeById(noticeId) {
        mui.ajax(ctx+'front/noteList/'+noticeId, {
            dataType: 'json',//服务器返回json格式数据
            type: 'get',//HTTP请求类型
            timeout: 10000,//超时时间设置为10秒；
            headers: {'Content-Type': 'application/json'},
            success: function (res) {
                //服务器返回响应，根据响应结果，分析是否登录成功；
				let str ='<h1>'+res.data.noticeTitle+'</h1><p>'+res.data.noticeContent+'</p><p>发布时间：'+res.data.createTime+'</p>'
				$("#flex3").append(str)
            },
            error: function (xhr, type, errorThrown) {
                //异常处理；
                console.log(type);
            }
        });

    }

</script>
</body>

</html>
